package com.zifeng.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zifeng.pojo.Assignment;
import com.zifeng.pojo.Order;
import com.zifeng.utils.PageUtils;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * 船舶委托Service接口
 * 
 * @author zifeng
 * @date 2025-03-27
 */
public interface IAssignmentService extends IService<Assignment> {
    // 接取委托
    public void aggregateAssignments(int id, int clientId);

    // 接取委托的分布式事务
    public void doMysqlLocalTransaction(Order order);

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 查询
     * 
     * @param id 主键
     * @return 
     */
    public Assignment selectAssignmentById(Long id);

    /**
     * 新增
     * 
     * @param assignment 
     * @return 结果
     */
    public int insertAssignment(Assignment assignment);

    /**
     * 修改
     * 
     * @param assignment 
     * @return 结果
     */
    public int updateAssignment(Assignment assignment);

    /**
     * 批量删除
     * 
     * @param ids 需要删除的主键集合
     * @return 结果
     */
    public int deleteAssignmentByIds(Long[] ids);

    /**
     * 删除信息
     * 
     * @param id 主键
     * @return 结果
     */
    public int deleteAssignmentById(Long id);
}
